package net.metashare.grah.logic

/**
 * Grah is a notion produced by metashare.net
 * User: dsherema
 * Date: May 1, 2010
 * Time: 5:00:18 PM
 *
 */
class Substring implements Predicate {

  def String substring

  def Substring(substring) {
    this.substring = substring;
  }

  def Substring(substring, startIndex) {
    this.substring = substring;
  }

  def boolean apply(Object object) {
    String s = (String) object
    return s.find(substring)
  }

}
